}
static void
-assistant_remove_page_cb (GtkNotebook *notebook,
- GtkWidget *page,
+assistant_remove_page_cb (GtkNotebook *notebook,
+ GtkWidget *page,
GtkAssistant *assistant)
{
GtkAssistantPrivate *priv = assistant->priv;
GList *page_node;
GList *element;
+ if (GTK_IS_BOX (page))
+ {
+ GList *children;
+
+ children = gtk_container_get_children (GTK_CONTAINER (page));
+ page = GTK_WIDGET (children->data);
+ g_list_free (children);
+ }
+
element = find_page (assistant, page);
if (!element)
return;
GtkWidget *page)
{
GtkAssistant *assistant = (GtkAssistant*) container;
+ GtkWidget *box;
/* Forward this removal to the content notebook */
- if (gtk_widget_get_parent (page) == assistant->priv->content)
+ box = gtk_widget_get_parent (page);
+ if (gtk_widget_get_parent (box) == assistant->priv->content)
{
container = (GtkContainer *) assistant->priv->content;
- gtk_container_remove (container, page);
+ gtk_container_remove (container, box);
}
}
GtkAssistantPage *page_info;
gint n_pages;
GtkStyleContext *context;
+ GtkWidget *box;
g_return_val_if_fail (GTK_IS_ASSISTANT (assistant), 0);
g_return_val_if_fail (GTK_IS_WIDGET (page), 0);
gtk_box_reorder_child (GTK_BOX (priv->sidebar), page_info->regular_title, 2 * position);
gtk_box_reorder_child (GTK_BOX (priv->sidebar), page_info->current_title, 2 * position + 1);
- gtk_notebook_insert_page (GTK_NOTEBOOK (priv->content), page, NULL, position);
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_widget_show (box);
+ gtk_box_pack_start (GTK_BOX (box), page, TRUE, TRUE, 0);
+ g_object_set (box, "margin", 12, NULL);
+
+ gtk_notebook_insert_page (GTK_NOTEBOOK (priv->content), box, NULL, position);
if (gtk_widget_get_mapped (GTK_WIDGET (assistant)))
{